package cn.lyd.pet.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import cn.lyd.base.domain.BaseDomain;
import cn.lyd.org.domain.Shop;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author lyd
 * @since 2023-01-08
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Pet extends BaseDomain{

    @NotBlank
    private String name;
    @NotNull
    private BigDecimal costprice;
    @NotNull
    private BigDecimal saleprice;
    /**
     * 类型id
     */
    @NotNull
    private Long type_id;
    @NotBlank
    private String resources;
    /**
     * 状态：0下架 1上架
     */
    @NotNull
    private Integer state;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    private Date createtime;
    /**
     * 店铺Id 如果被领养店铺id为null
     */
    @NotNull
    private Long shop_id;
    /**
     * 如果被领养为领养用户id
     */
    private Long user_id;
    private Long search_master_msg_id;

    //品种
    @NotEmpty
    private  PetType  type;

    //店铺
    @NotEmpty
    private Shop shop;
    //用户

    @NotEmpty
    //宠物明细   detail必须和前端一致
    private PetDetail detail;



}
